<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String rootPath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/";
%>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>自在生活</title>
		<link rel="stylesheet" href="<%=basePath %>css/bootstrap.min.css"></link>
		<link rel="stylesheet" href="<%=basePath %>css/swiper-3.3.1.min.css" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
		<style>
			body {
		        background: #eee;
		        font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
		        font-size: 14px;
		        color:#000;
		        margin: 0;
		        padding: 0;
		        /*overflow:hidden; */
		    }
			html, body {
				height:100%;
				font-size: 10pt;
				background : #eee; 
			}
			h1 {
				font-size: 18pt;
			}
			h2 {
				font-size: 14pt;
			}
			.warning {
				font-weight: bold;
			}
			
		    .swiper-container {
		        width: 100%;
		        height: 224px;
		        margin: 20px auto;
		    }
		    .swiper-slide {
		        text-align: center;
		        font-size: 18px;
		        /* Center slide text vertically */
		        display: -webkit-box;
		        display: -ms-flexbox;
		        display: -webkit-flex;
		        display: flex;
		        -webkit-box-pack: center;
		        -ms-flex-pack: center;
		        -webkit-justify-content: center;
		        justify-content: center;
		        -webkit-box-align: center;
		        -ms-flex-align: center;
		        -webkit-align-items: center;
		        align-items: center;
		    }
			.navbar-default{
				border: 0px;
			}
			.piclun {
				width: 200%;padding-left: 0px;
			}
			.piclun li{
				display: inline-block;;
			}
			.piclun li img{
				float: left;
			}
			a{color: #FFF;}
			a:focus, a:hover{color: #888888;text-decoration: none;}
			.onClishaed{color: #888888;}
			.row{margin-right:0px;margin-left:0px}
		</style>
	</head>
	<body>
		<div >
			
			<div id="header-bar" class="navbar navbar-inverse" style="margin-bottom: 0px">
				<div class="container-fluid" style="color: #FFFFFF;">
					<!--<ul class="nav navbar-nav">
						<li class="col-md-1 col-md-offset-4"></li>
						<li><a href="#" style="color: #FFFFFF;">智能家居</a></li>
						<li><a href="#" style="color: #FFFFFF;">APP下载</a></li>
						<li><a href="#" style="color: #FFFFFF;">关于我们</a></li>
					</ul>-->
					<div class="row" style="margin: 15px 0px;">
						<div class=" col-xs-3 col-sm-1 col-sm-offset-3">
							<a href="<%=basePath %>home">
								<img src="images/logo.png" style="width: 15px;" />
							</a>
						</div>
						<div class="col-xs-3 col-sm-2">
							<a href="<%=basePath %>panorama">智能家居</a>
						</div>
						<div class="col-xs-3 col-sm-2">
							<a href="<%=basePath %>download">APP下载</a>
						</div>
						<div class="col-xs-3 col-sm-2">
							<a class="onClishaed" href="<%=basePath %>aboutUs">关于我们</a>
						</div>
					</div>
				</div>
			</div>
			<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
			  <!-- Indicators -->
			  <!-- <ol id="carouselIddicat" class="carousel-indicators">
			    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
			    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
			    <li data-target="#carousel-example-generic" data-slide-to="2"></li> 
			  </ol> -->
			
			  <!-- Wrapper for slides -->
			  <div id="carouselList"  class="carousel-inner" role="listbox">
			    <%-- <div class="item active">
			      <img src="<%=basePath %>images/C5AD.tm.png" alt="...">
			      <div class="carousel-caption">
			      </div>
			    </div>
			    <div class="item">
			      <img src="<%=basePath %>images/C5AD.tm.png" alt="...">
			      <div class="carousel-caption">
			      </div>
			    </div>
			    <div class="item">
			      <img src="<%=basePath %>images/C5AD.tm.png" alt="...">
			      <div class="carousel-caption">
			      </div>
			    </div> --%>
			  </div>
			
			  <!-- Controls -->
			  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
			    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
			    <span class="sr-only">Previous</span>
			  </a>
			  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
			    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
			    <span class="sr-only">Next</span>
			  </a>
			</div>
			<div class="content-wrap" style="margin-top: 3%">
				<div class="container">
					<div class="row">
						<p style="font-size: 20px">公司简介</p>
						<p>
							跨业联盟致力于打造一个真正属于我们中国人值得信赖的综合型平台。秉承着“以爱为基础，以利他为原则，以温暖为传导”的经营理念，集合了“分享即可获得价值”的观点，营造一个众富的社群平台。为商家寻找优质客户，为消费者寻找好产品及服务，为我们的创业者寻找创业机会及合法资金，为我们的投资者寻找好项目。
							自在生活是跨业联盟旗下的一个产品，主要有智能家居，智慧教育，专家资源库等。
						</p>
					</div>
					<div class="row" style="margin-top: 3%">
						<p style="font-size: 20px">微信公众号</p>
						<div id="publicNumber" class="row">
							<%-- <div id="publicNumberO" class="col-xs-6 col-md-6">
								<div class="col-md-12" style="text-align: center;">
									<img class="col-md-4" style="text-align: center;float:initial" src="<%=basePath %>images/1471589769.png" />
								</div>
								<div class="text-center">自在生活</div>
							</div>
							<div  id="publicNumberS" class="col-xs-6 col-md-6">
								<div class="col-md-12" style="text-align: center;">
									<img class="col-md-4" style="float:initial" src="<%=basePath %>images/1471589769.png" />
								</div>
								<div class="text-center">跨业联盟</div>
							</div> --%>
						</div>
					</div>
					<div class="row" style="margin-top: 3%;margin-bottom: 3%">
						<p style="font-size: 20px">线下会所</p>
						<div id="medic" class="row">
							<div id="medicO" class="col-md-6">
								<div class="col-md-12">
									<img id="medicOpic" onclick="goTomedicOpic()" class="col-md-10" src="" />
								</div>
								<div class="col-md-12" style="margin-top: 2%">
									<div class="col-md-10">总会：广州市白云区金沙洲沙溪工业园跨业联盟A1栋</div>
									<div class="col-md-10">电话：<span>020-81157629</span>&nbsp&nbsp&nbsp<span>0757-81181005</span></div>
								</div>
							</div>
							<div id="medicS" class="col-md-6">
								<div class="col-md-12">
									<img id="medicSpic" onclick="goTomedicSpic()" class="col-md-10"  src="" />
								</div>
								<div class="col-md-12" style="margin-top: 2%">
									<div class="col-md-10">总会：广州市白云区金沙洲沙溪工业园跨业联盟A1栋</div>
									<div class="col-md-10">电话：<span>020-81157629</span>&nbsp&nbsp&nbsp<span>0757-81181005</span></div>
								</div>
							</div>
						</div>
					</div>	
				</div>
			</div>
			
			<%-- <div>
				<img id="aboutUs" src="<%=basePath %>images/banner_gywm.jpg" style="width: 100%;"/>
			</div> --%>
			<div id="footer-bar" class="footer text-muted" style="padding: 21px 0px;background-color: #25292c;">
				<div class="container-fluid">
					<div class="row" style="margin: 7px 0px;color: #cecdcb;">
						<div class="col-sm-12 " style="text-align: center;">
							 Copyright©2016 <a href="http://www.izzsh.com">izzsh.com</a> All Rights Reserved 广州市丰品信息科技有限公司
							 <span><script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1260439132'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s95.cnzz.com/z_stat.php%3Fid%3D1260439132%26show%3Dpic2' type='text/javascript'%3E%3C/script%3E"));</script></span>
						</div>
					</div>
				</div>
			</div>
		</div>
	<script src="<%=basePath %>js/jquery-1.9.1.min.js"></script>
	<script src="<%=basePath %>js/bootstrap.min.js"></script>
	<script>
		var base1,base2='';
		$(function(){
			//关于我们轮播
			$.ajax({
				type:'Post',
				url:'<%=basePath%>'+'up/getPicList',
				data:{
					type:'2',    //图片类型：0-轮播图片，1-商品图片，2-关于我们，3-app下载
					isAble:'1', //isAble：0-不可用，1-可用
				    page:'1',
				    rows:'100'	//rows 商品传100（商品最大100张）
				},
				success:function(data){
					var res = $.parseJSON(data);
					var commodityList=document.getElementById('commodityPic');
					var list='';
					if(res.total!=0){
						var result=res.rows;
						var Alist=document.getElementById("carouselList");
						//var indicator=document.getElementById("carouselIddicat");
						var indicat='';
					 	for(var i=0;i<res.total;i++){
							if(i==0){
								if(result[i].action==null){
									list+='<div class="item active">';									
								}else{
									list+='<div class="item active"><a href="'+result[i].action+'">';
								}
								indicat+=' <li data-target="#carousel-example-generic" data-slide-to="'+i+'" class="active"></li>';
							}else{
								if(result[i].action==null){
									list+='<div class="item">';									
								}else{
									list+='<div class="item"><a href="'+result[i].action+'">';
								}
								indicat+=' <li data-target="#carousel-example-generic" data-slide-to="'+i+'"></li>';
							}
								list+='<img src="<%=rootPath %>'+result[i].path+'" alt="...">'
										+'<div class="carousel-caption"></div>';
							if(result[i].action==null){
								list+='</div>';									
							}else{
								list+='</a> </div>';
							}			
										
						} 
						Alist.innerHTML=list;
						//indicator.innerHTML=indicat;
					}
				}
			});
			//公众号
			$.ajax({
				type:'post',
				url:'<%=basePath%>'+'up/getPicList',
				data:{
					type:'5',
					isAble:'1',
				    page:'1',
				    rows:'2'
				},
				success:function(data){
					var res = $.parseJSON(data);
					if(res.total!=0){
						//$("#aboutUs").attr('src','<%=rootPath%>' + res.rows[0].path);
						var publicNumberList=document.getElementById('publicNumber');
						var list='';
						list+='<div class="col-xs-6 col-md-6" style="padding-right:0px;padding-left:0px"><div class="col-md-12" style="text-align: center;padding-right:0px;padding-left:0px">'
								+'<a href="'+res.rows[0].action+'"><img class="col-md-4" style="text-align: center;float:initial;max-width:150px" src="<%=rootPath %>'+res.rows[0].path+'" /></a>'
								+'</div><div class="text-center">自在生活</div></div>'
								+'<div class="col-xs-6 col-md-6" style="padding-right:0px;padding-left:0px"><div class="col-md-12" style="text-align: center;padding-right:0px;padding-left:0px">'
								+'<a href="'+res.rows[1].action+'"><img class="col-md-4" style="float:initial;max-width:150px" src="<%=rootPath %>'+res.rows[1].path+'" /></a>'
								+'</div><div class="text-center">跨业联盟</div></div>';
						publicNumberList.innerHTML=list;		
					}
				}
			});
			 //线下会所
			 $.ajax({
					type:'post',
					url:'<%=basePath%>'+'up/getPicList',
					data:{
						type:'6',
						isAble:'1',
					    page:'1',
					    rows:'2'
					},
					success:function(data){
						var res = $.parseJSON(data);
						if(res.total!=0){
							$("#medicOpic").attr('src','<%=rootPath%>' + res.rows[0].path);
							$("#medicSpic").attr('src','<%=rootPath%>' + res.rows[1].path);
							base1=res.rows[0].action;
							base2=res.rows[1].action;
							/* 平台兼容 */
							 var system = { 
							            win: false, 
							            mac: false, 
							            xll: false, 
							            ipad:false,
							            android:false,
							            iPhone:false
							        }; 
							        //检测平台 
							        var p = navigator.platform; 
							        system.win = p.indexOf("Win") == 0; 
							        system.mac = p.indexOf("Mac") == 0; 
							        system.x11 = (p == "X11") || (p.indexOf("Linux") == 0); 
							        system.ipad = (navigator.userAgent.match(/iPad/i) != null)?true:false; 
							        system.android = (navigator.userAgent.match(/android/i) != null)?true:false; 
							        system.iPhone = (navigator.userAgent.match(/iPhone/i) != null)?true:false; 
							        //跳转语句，如果是手机访问就自动跳转到wap.baidu.com页面 
							        
							        if (system.ipad) { 
							        	$("#medicO").attr("class","col-xs-6 col-md-6");
							        	$("#medicS").attr("class","col-xs-6 col-md-6");
							        	$("#medicOpic").attr("class","col-xs-12 col-md-12");
							        	$("#medicSpic").attr("class","col-xs-12 col-md-12");
							        } else if(system.iPhone || system.android){ 
							        	$("#medicO").attr("class","col-xs-12 col-md-12");
							        	$("#medicS").attr("class","col-xs-12 col-md-12");
							        	$("#medicOpic").attr("class","col-xs-12 col-md-12");
							        	$("#medicSpic").attr("class","col-xs-12 col-md-12");
							        } 
						}
					}
				});
			 
		});
		function goTomedicOpic(){
			window.location.href=base1;
		}
		function goTomedicSpic(){
			window.location.href=base2;
		}
		 <%-- $.ajax({
			type:'POst',
			url:'<%=basePath%>'+'up/getPicList',
			data:{
				type:'2',
				isAble:'1',
			    page:'1',
			    rows:'1'
			},
			success:function(data){
				var res = $.parseJSON(data);
				if(res.total!=0){
					$("#aboutUs").attr('src','<%=rootPath%>' + res.rows[0].path);
				}
			}
		});  --%>
		
	</script>
	</body>
</html>
